package com.wing.order.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wing.order.model.entity.Purchase;
import com.wing.order.model.response.OrderDeliverySignVO;
import com.wing.order.model.response.PurchaseBarCodeVo;
import com.wing.order.model.response.PurchaseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采购-Dao
 *
 * @author
 */
@Mapper
public interface PurchaseDao extends BaseMapper<Purchase> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PurchaseVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<PurchaseVO> list4app(@Param("page") Page<PurchaseVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PurchaseVO get4appById(Long id);

    /**
     * 根据code 查询采购计划
     */
    PurchaseVO getPurchaseByCode(@Param("code")String code);

    /**
     * 根据签收id查询 签收单下所有产品的签收条码
     * @param id 采购签收列表id
     * @return
     */
    Page<PurchaseBarCodeVo> getLableBySignId(IPage<PurchaseBarCodeVo> page,@Param("id") Long id);
}
